﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml;
using VSOfflineMaker.Properties;

namespace VSOfflineMaker
{
    // Token: 0x02000006 RID: 6
    public partial class MainForm : Form
    {
        // Token: 0x14000001 RID: 1
        // (add) Token: 0x06000012 RID: 18 RVA: 0x00002308 File Offset: 0x00000508
        // (remove) Token: 0x06000013 RID: 19 RVA: 0x00002340 File Offset: 0x00000540
        public event DelReadStdOutput ReadStdOutput;

        // Token: 0x14000002 RID: 2
        // (add) Token: 0x06000014 RID: 20 RVA: 0x00002378 File Offset: 0x00000578
        // (remove) Token: 0x06000015 RID: 21 RVA: 0x000023B0 File Offset: 0x000005B0
        public event DelReadErrOutput ReadErrOutput;

        // Token: 0x06000016 RID: 22 RVA: 0x000023E8 File Offset: 0x000005E8
        public MainForm()
        {
            this.InitializeComponent();
            this.Init();
        }

        // Token: 0x06000017 RID: 23 RVA: 0x00002EE2 File Offset: 0x000010E2
        private void Init()
        {
            this.ReadStdOutput += this.ReadStdOutputAction;
            this.ReadErrOutput += this.ReadErrOutputAction;
        }

        // Token: 0x06000018 RID: 24 RVA: 0x00002F08 File Offset: 0x00001108
        private void MainForm_Shown(object sender, EventArgs e)
        {
            if (Settings.Default["程序版本"].ToString() != "")
            {
                this.comboBox1.SelectedItem = Settings.Default["程序版本"].ToString();
            }
            if (Settings.Default["缓存目录"].ToString() != "")
            {
                this.txtSaveDirectory.Text = Settings.Default["缓存目录"].ToString();
            }
            string text = "";
            string text2 = "";
            if (Settings.Default["选择负载"].ToString() != "")
            {
                text = Settings.Default["选择负载"].ToString();
            }
            if (Settings.Default["选择组件"].ToString() != "")
            {
                text2 = Settings.Default["选择组件"].ToString();
            }
            this.treeViewWorkload.Nodes.Clear();
            foreach (MainForm.DicNode dicNode in this.workloadList)
            {
                TreeNode treeNode = new TreeNode();
                treeNode.Name = dicNode.Name;
                treeNode.Text = dicNode.Text;
                treeNode.ToolTipText = dicNode.Tooltip;
                if (text.IndexOf(dicNode.Name) > -1)
                {
                    dicNode.Ischecked = true;
                    treeNode.Checked = true;
                }
                if (dicNode.Name == "CoreEditor")
                {
                    treeNode.Checked = true;
                }
                if (dicNode.Name == "Others")
                {
                    int num = 0;
                    foreach (MainForm.DicNode dicNode2 in this.componentList)
                    {
                        TreeNode treeNode2 = new TreeNode();
                        treeNode2.Name = dicNode2.Name;
                        treeNode2.Text = dicNode2.Text;
                        treeNode2.ToolTipText = dicNode2.Tooltip;
                        treeNode.Nodes.Add(treeNode2);
                        if (text2.IndexOf(dicNode2.Name) > -1)
                        {
                            dicNode2.Ischecked = true;
                            treeNode2.Checked = true;
                            num++;
                        }
                    }
                    if (treeNode.Nodes.Count != num)
                    {
                        treeNode.Checked = false;
                        dicNode.Ischecked = false;
                    }
                }
                this.treeViewWorkload.Nodes.Add(treeNode);
            }
        }

        // Token: 0x06000019 RID: 25 RVA: 0x000031CC File Offset: 0x000013CC
        private void treeViewWorkload_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            if (e.Node.Name == "CoreEditor")
            {
                if (!e.Node.Checked)
                {
                    e.Node.Checked = true;
                    return;
                }
            }
            else
            {
                if (e.Node.Nodes.Count > 0)
                {
                    foreach (object obj in e.Node.Nodes)
                    {
                        ((TreeNode)obj).Checked = e.Node.Checked;
                    }
                    foreach (MainForm.DicNode dicNode in (from a in this.componentList
                                                          where a.Parentname == e.Node.Name
                                                          select a).ToList<MainForm.DicNode>())
                    {
                        dicNode.Ischecked = e.Node.Checked;
                    }
                }
                if (e.Node.Parent != null)
                {
                    int count = e.Node.Parent.Nodes.Count;
                    int num = 0;
                    foreach (TreeNode node in e.Node.Parent.Nodes)
                    {
                        if (node.Checked)
                        {
                            num++;
                        }

                    }
                    if (count == num)
                    {
                        e.Node.Parent.Checked = true;
                    }
                    else
                    {
                        e.Node.Parent.Checked = false;
                    }
                }
                MainForm.DicNode dicNode2 = this.workloadList.Find((MainForm.DicNode a) => a.Name == e.Node.Name);
                if (dicNode2 != null)
                {
                    dicNode2.Ischecked = e.Node.Checked;
                }
                dicNode2 = this.componentList.Find((MainForm.DicNode a) => a.Name == e.Node.Name);
                if (dicNode2 != null)
                {
                    dicNode2.Ischecked = e.Node.Checked;
                }
            }
        }

        // Token: 0x0600001A RID: 26 RVA: 0x00003434 File Offset: 0x00001634
        private string getFileNameByTypeCombox()
        {
            string result = "";
            string a = this.comboBox1.SelectedItem.ToString();
            if (a == "Visual Studio Community 2022")
            {
                result = "vs_community.exe";
            }
            else if (a == "Visual Studio Professional 2022")
            {
                result = "vs_professional.exe";
            }
            else if (a == "Visual Studio Enterprise 2022")
            {
                result = "vs_enterprise.exe";
            }
            return result;
        }

        // Token: 0x0600001B RID: 27 RVA: 0x00003498 File Offset: 0x00001698
        private void RealAction(string StartCmd)
        {
            Process process = new Process();
            process.StartInfo.FileName = "cmd.exe";
            process.StartInfo.WorkingDirectory = ".";
            process.StartInfo.CreateNoWindow = true;
            process.StartInfo.UseShellExecute = false;
            process.StartInfo.RedirectStandardInput = true;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError = true;
            process.OutputDataReceived += this.p_OutputDataReceived;
            process.ErrorDataReceived += this.p_ErrorDataReceived;
            process.EnableRaisingEvents = true;
            process.Exited += this.CmdProcess_Exited;
            process.Start();
            process.StandardInput.WriteLine(StartCmd);
            process.BeginOutputReadLine();
            process.BeginErrorReadLine();
        }

        // Token: 0x0600001C RID: 28 RVA: 0x00003561 File Offset: 0x00001761
        private void p_OutputDataReceived(object sender, DataReceivedEventArgs e)
        {
            if (e.Data != null)
            {
                base.Invoke(this.ReadStdOutput, new object[]
                {
                    e.Data
                });
            }
        }

        // Token: 0x0600001D RID: 29 RVA: 0x00003587 File Offset: 0x00001787
        private void p_ErrorDataReceived(object sender, DataReceivedEventArgs e)
        {
            if (e.Data != null)
            {
                base.Invoke(this.ReadErrOutput, new object[]
                {
                    e.Data
                });
            }
        }

        // Token: 0x0600001E RID: 30 RVA: 0x000035AD File Offset: 0x000017AD
        private void ReadStdOutputAction(string result)
        {
            this.txtcmdLogTextArea.AppendText(result + "\r\n");
        }

        // Token: 0x0600001F RID: 31 RVA: 0x00002050 File Offset: 0x00000250
        private void ReadErrOutputAction(string result)
        {
        }

        // Token: 0x06000020 RID: 32 RVA: 0x00002050 File Offset: 0x00000250
        private void CmdProcess_Exited(object sender, EventArgs e)
        {
        }

        // Token: 0x06000021 RID: 33 RVA: 0x000035C8 File Offset: 0x000017C8
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            new DirectoryInfo(Environment.CurrentDirectory).GetFiles(this.getFileNameByTypeCombox());
            if (this.comboBox1.Text == "Visual Studio Community 2022")
            {
                this.label3.Text = "社区版无需序列号";
                return;
            }
            if (this.comboBox1.Text == "Visual Studio Professional 2022")
            {
                this.label3.Text = "TD244-P4NB7-YQ6XK-Y8MMM-YWV2J";
                return;
            }
            if (this.comboBox1.Text == "Visual Studio Enterprise 2022")
            {
                this.label3.Text = "VHF9H-NXBBB-638P6-6JHCY-88JWH";
            }
        }

        // Token: 0x06000022 RID: 34 RVA: 0x00003664 File Offset: 0x00001864
        private void btnSelectDir_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
            folderBrowserDialog.ShowNewFolderButton = true;
            if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
            {
                this.txtSaveDirectory.Text = folderBrowserDialog.SelectedPath;
            }
        }

        // Token: 0x06000023 RID: 35 RVA: 0x00003698 File Offset: 0x00001898
        private void linkDown_Click(object sender, EventArgs e)
        {
            string fromPath = this.baseFromPath + this.getFileNameByTypeCombox();
            string downPath = this.baseDownPath + "\\" + this.getFileNameByTypeCombox();
            if (new DownFile(fromPath, downPath)
            {
                StartPosition = FormStartPosition.CenterParent
            }.ShowDialog() == DialogResult.OK)
            {
                this.comboBox1_SelectedIndexChanged(null, null);
                MessageBoxEx.Show("下载成功！");
            }
        }

        // Token: 0x06000024 RID: 36 RVA: 0x000036F8 File Offset: 0x000018F8
        private void btnSave_Click(object sender, EventArgs e)
        {
            string filename = Application.ExecutablePath + ".config";
            XmlDocument xmlDocument = new XmlDocument();
            xmlDocument.Load(filename);
            string xpath = "configuration/applicationSettings/vs2022离线安装操作.Properties.Settings/setting[@name='程序版本']/value";
            XmlNode xmlNode = xmlDocument.SelectSingleNode(xpath);
            if (xmlNode != null && this.comboBox1.SelectedIndex > -1)
            {
                xmlNode.InnerText = this.comboBox1.SelectedItem.ToString();
                xmlDocument.Save(filename);
            }
            xpath = "configuration/applicationSettings/vs2022离线安装操作.Properties.Settings/setting[@name='缓存目录']/value";
            xmlNode = xmlDocument.SelectSingleNode(xpath);
            if (xmlNode != null)
            {
                xmlNode.InnerText = this.txtSaveDirectory.Text.Trim();
                xmlDocument.Save(filename);
                Settings.Default.Reload();
            }
            string text = "";
            xpath = "configuration/applicationSettings/vs2022离线安装操作.Properties.Settings/setting[@name='选择负载']/value";
            xmlNode = xmlDocument.SelectSingleNode(xpath);
            if (xmlNode != null)
            {
                text = "";
                foreach (MainForm.DicNode dicNode in (from a in this.workloadList
                                                      where a.Ischecked
                                                      select a).ToList<MainForm.DicNode>())
                {
                    if (text != "")
                    {
                        text += "|";
                    }
                    text += dicNode.Name;
                }
                xmlNode.InnerText = text;
                xmlDocument.Save(filename);
                Settings.Default.Reload();
            }
            xpath = "configuration/applicationSettings/vs2022离线安装操作.Properties.Settings/setting[@name='选择组件']/value";
            xmlNode = xmlDocument.SelectSingleNode(xpath);
            if (xmlNode != null)
            {
                text = "";
                foreach (MainForm.DicNode dicNode2 in (from a in this.componentList
                                                       where a.Ischecked
                                                       select a).ToList<MainForm.DicNode>())
                {
                    if (text != "")
                    {
                        text += "|";
                    }
                    text += dicNode2.Name;
                }
                xmlNode.InnerText = text;
                xmlDocument.Save(filename);
                Settings.Default.Reload();
            }
            MessageBoxEx.Show(this, "保存成功", "提示");
        }

        // Token: 0x06000025 RID: 37 RVA: 0x00003940 File Offset: 0x00001B40
        private void btnBuild_Click(object sender, EventArgs e)
        {
            if (this.comboBox1.SelectedIndex == -1)
            {
                MessageBoxEx.Show(this, "请选择程序版本", "提示");
                return;
            }
            if (this.txtSaveDirectory.Text.ToString() == "")
            {
                MessageBoxEx.Show(this, "请选择缓存目录", "提示");
                return;
            }
            if (!Directory.Exists(this.txtSaveDirectory.Text.Trim()))
            {
                MessageBoxEx.Show(this, "缓存目录不存在，请检查后重试", "提示");
                return;
            }
            List<MainForm.DicNode> list = (from a in this.workloadList
                                           where a.Ischecked
                                           select a).ToList<MainForm.DicNode>();
            List<MainForm.DicNode> list2 = (from a in this.componentList
                                            where a.Ischecked
                                            select a).ToList<MainForm.DicNode>();
            if (list.Count == 1 && list2.Count == 0 && MessageBoxEx.Show("是否确认只安装核心组件?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
            {
                return;
            }
            string text = "";
            foreach (MainForm.DicNode dicNode in list)
            {
                if (dicNode.Name == "Others")
                {
                    List<MainForm.DicNode> second = (from a in this.componentList
                                                     where a.Parentname == "Others"
                                                     select a).ToList<MainForm.DicNode>();
                    list2 = list2.Concat(second).ToList<MainForm.DicNode>();
                }
                else
                {
                    text = text + "--add Microsoft.VisualStudio.Workload." + dicNode.Name + " ";
                }
            }
            foreach (MainForm.DicNode dicNode2 in list2)
            {
                text = text + "--add " + dicNode2.Name + " ";
            }
            if (text != "")
            {
                text += "--includeRecommended ";
            }
            string text2 = string.Concat(new string[]
            {
                this.getFileNameByTypeCombox(),
                " --layout ",
                this.txtSaveDirectory.Text.Trim(),
                " ",
                text,
                " --lang Zh-cn"
            });
            this.txtcmdLogTextArea.Text = text2;
        }

        // Token: 0x06000026 RID: 38 RVA: 0x00003BB0 File Offset: 0x00001DB0
        private void btnDown_Click(object sender, EventArgs e)
        {
            this.RealAction(this.txtcmdLogTextArea.Text);
        }

        // Token: 0x06000027 RID: 39 RVA: 0x00003BC4 File Offset: 0x00001DC4
        private void linkClean_Click(object sender, EventArgs e)
        {
            if (this.comboBox1.SelectedIndex == -1)
            {
                MessageBoxEx.Show(this, "请选择程序版本", "提示");
                return;
            }
            if (this.linkDown.Visible)
            {
                MessageBoxEx.Show(this, "请先下载相关程序", "提示");
                return;
            }
            if (this.txtSaveDirectory.Text.ToString() == "")
            {
                MessageBoxEx.Show(this, "请选择缓存目录", "提示");
                return;
            }
            if (!Directory.Exists(this.txtSaveDirectory.Text.Trim()))
            {
                MessageBoxEx.Show(this, "缓存目录不存在，请检查后重试", "提示");
                return;
            }
            DirectoryInfo[] directories = new DirectoryInfo(this.txtSaveDirectory.Text.ToString()).GetDirectories("Archive");
            if (directories.Length == 0)
            {
                MessageBoxEx.Show(this, "当前缓存目录下文件无需清理", "提示");
                return;
            }
            directories = directories[0].GetDirectories();
            if (directories.Length == 0)
            {
                MessageBoxEx.Show(this, "当前缓存目录下文件无需清理", "提示");
                return;
            }
            string text;
            if (directories.Length > 1)
            {
                MessageBoxEx.Show("当前目录存在多个旧文件记录，请选择指定文件夹下Catalog.json文件，清理旧文件", "提示");
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.InitialDirectory = this.txtSaveDirectory.Text + "\\Archive";
                openFileDialog.Multiselect = false;
                if (openFileDialog.ShowDialog() != DialogResult.OK)
                {
                    return;
                }
                text = openFileDialog.FileName;
            }
            else
            {
                text = this.txtSaveDirectory.Text.Trim() + "\\Archive\\" + directories[0].Name + "\\Catalog.json";
            }
            string startCmd = string.Concat(new string[]
            {
                this.getFileNameByTypeCombox(),
                " --layout ",
                this.txtSaveDirectory.Text.Trim(),
                " --clean ",
                text
            });
            this.RealAction(startCmd);
        }

        // Token: 0x06000028 RID: 40 RVA: 0x00003D7E File Offset: 0x00001F7E
        private void Label3_MouseMove(object sender, MouseEventArgs e)
        {
            new ToolTip
            {
                ShowAlways = true
            }.SetToolTip(this.label3, "单击复制序列号");
        }

        // Token: 0x06000029 RID: 41 RVA: 0x00003D9C File Offset: 0x00001F9C
        private void Label3_Click(object sender, EventArgs e)
        {
            if (this.label3.Text == "社区版无需序列号")
            {
                MessageBox.Show(this, "社区版不用序列号的哦", "温馨提示");
                return;
            }
            Clipboard.SetText(this.label3.Text);
            MessageBox.Show(this, "序列号已写入剪切板", "温馨提示");
        }

        // Token: 0x04000009 RID: 9
        private string baseFromPath = "https://aka.ms/vs/17/release/";

        // Token: 0x0400000A RID: 10
        private string baseDownPath = Environment.CurrentDirectory;

        // Token: 0x0400000B RID: 11
        private List<MainForm.DicNode> workloadList = new List<MainForm.DicNode>
        {
            new MainForm.DicNode
            {
                Name = "CoreEditor",
                Text = "Visual Studio 核心编辑器",
                Tooltip = "Visual Studio 核心 shell 体验，包括语法感知代码编辑、源代码管理和工作项管理。",
                Ischecked = true
            },
            new MainForm.DicNode
            {
                Name = "Azure",
                Text = "Azure 开发",
                Tooltip = "用于开发云应用、创建资源以及生成包括 Docker 支持的容器的 Azure SDK、工具和项目。"
            },
            new MainForm.DicNode
            {
                Name = "Data",
                Text = "数据存储和处理",
                Tooltip = "使用 SQL Server、Azure Data Lake 或 Hadoop 连接、开发和测试数据解决方案。"
            },
            new MainForm.DicNode
            {
                Name = "DataScience",
                Text = "数据科学和分析应用程序",
                Tooltip = "用于创建数据科学应用程序的语言和工具（包括 Python、R 和 F#）。"
            },
            new MainForm.DicNode
            {
                Name = "ManagedDesktop",
                Text = ".NET 桌面开发",
                Tooltip = "使用 C#、Visual Basic 和 F# 生成 WPF、Windows 窗体和控制台应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "ManagedGame",
                Text = "使用 Unity 的游戏开发",
                Tooltip = "使用 Unity（功能强大的跨平台开发环境）创建 2D 和 3D 游戏。"
            },
            new MainForm.DicNode
            {
                Name = "NativeCrossPlat",
                Text = "使用 C++ 的 Linux 开发",
                Tooltip = "创建和调试在 Linux 环境中运行的应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "NativeDesktop",
                Text = "使用 C++ 的桌面开发",
                Tooltip = "使用 Microsoft C++ 工具集、ATL 或 MFC 生成 Windows 桌面应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "NativeGame",
                Text = "使用 C++ 的游戏开发",
                Tooltip = "以 DirectX、Unreal 或 Cocos2d 为后盾，利用 C++ 的强大功能生成专业游戏。"
            },
            new MainForm.DicNode
            {
                Name = "NativeMobile",
                Text = "使用 C++ 的移动开发",
                Tooltip = "使用 C++ 生成适用于 iOS、Android 或 Windows 的跨平台应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "NetCoreTools",
                Text = ".NET Core 跨平台开发",
                Tooltip = "使用 .NET Core、ASP.NET Core、HTML/JavaScript 和包括 Docker 支持的容器生成跨平台应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "NetCrossPlat",
                Text = "使用 .NET 的移动开发",
                Tooltip = "使用 Xmarin 生成适用于 iOS、Android 或 Windows 的跨平台应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "NetWeb",
                Text = "ASP.NET 和 Web 开发",
                Tooltip = "使用 ASP.NET、ASP.NET Core、HTML/JavaScript 和包括 Docker 支持的容器生成 Web 应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "Node",
                Text = "Node.js 开发",
                Tooltip = "使用 Node.js（事件驱动的异步 JavaScript 运行时）生成可扩展的网络应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "Office",
                Text = "Office/SharePoint 开发",
                Tooltip = "使用 C#、VB 和 JavaScript 创建 Office 和 SharePoint 外接程序、SharePoint 解决方案和 VSTO 外接程序。"
            },
            new MainForm.DicNode
            {
                Name = "Python",
                Text = "Python 开发",
                Tooltip = "适用于 Python 的编辑、调试、交互式开发和源代码管理。"
            },
            new MainForm.DicNode
            {
                Name = "Universal",
                Text = "通用 Windows 平台开发",
                Tooltip = "使用 C#、VB 和 JavaScript 或 C++（可选）创建适用于通用 Windows 平台的应用程序。"
            },
            new MainForm.DicNode
            {
                Name = "VisualStudioExtension",
                Text = "Visual Studio 扩展开发",
                Tooltip = "创建适用于 Visual Studio 的加载项和扩展，包括新命令、代码分析器和工具窗口。"
            },
            new MainForm.DicNode
            {
                Name = "WebCrossPlat",
                Text = "使用 JavaScript 的移动开发",
                Tooltip = "使用用于 Apache Cordova 的工具生成 Android、iOS 和 UWP 应用。"
            },
            new MainForm.DicNode
            {
                Name = "Others",
                Text = "独立组件",
                Tooltip = "这些组件不随附于任何工作负载，但可选择作为单个组件。"
            }
        };

        // Token: 0x0400000C RID: 12
        private List<MainForm.DicNode> componentList = new List<MainForm.DicNode>
        {
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Android.Emulator",
                Text = "适用于 Android 的 Visual Studio 仿真程序"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Android.NDK.R11C",
                Text = "Android NDK (R11C)"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Android.NDK.R11C_3264",
                Text = "Android NDK (R11C)（32 位）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Android.SDK23",
                Text = "Android SDK 安装程序（API 级别 23）（全局安装）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Android.SDK25",
                Text = "Android SDK 安装程序（API 级别 25）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.GitHub.VisualStudio",
                Text = "适用于 Visual Studio 的 GitHub 扩展"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Google.Android.Emulator.API23.V2",
                Text = "Google Android Emulator（API 级别 23）（全局安装）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Component.Google.Android.Emulator.API25",
                Text = "Google Android Emulator（API 级别 25）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.Component.Blend.SDK.WPF",
                Text = "用于 .NET 的 Blend for Visual Studio SDK "
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.Component.HelpViewer",
                Text = "帮助查看器"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.LinqToSql",
                Text = "LINQ to SQL 工具"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.Phone.Emulator Windows",
                Text = "10 移动版仿真程序（周年纪念版）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.Phone.Emulator.15063",
                Text = "Windows 10 Mobile 仿真器（创意者更新）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.Runtime.Node.x86.6.4.0",
                Text = "基于 Node.js v6.4.0 (x86) 的组件运行时"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.Runtime.Node.x86.7.4.0",
                Text = "基于 Node.js v7.4.0 (x86) 的组件运行时"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TestTools.CodedUITest",
                Text = "编码的 UI 测试"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TestTools.FeedbackClient",
                Text = "Microsoft Feedback Client"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TestTools.MicrosoftTestManager Microsoft",
                Text = "测试管理器"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TypeScript.2.0",
                Text = "TypeScript 2.0 SDK"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TypeScript.2.1",
                Text = "TypeScript 2.1 SDK"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TypeScript.2.2",
                Text = "TypeScript 2.2 SDK"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TypeScript.2.5",
                Text = "TypeScript 2.5 SDK"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TypeScript.2.6",
                Text = "TypeScript 2.6 SDK"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.TypeScript.2.7",
                Text = "TypeScript 2.7 SDK"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.UWP.VC.ARM64",
                Text = "适用于 ARM64 的 C++ 通用 Windows 平台工具"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.ATL.ARM.Spectre",
                Text = "带有 Spectre 缓解措施的 Visual C++ ATL for ARM"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.ATL.ARM64.Spectre",
                Text = "带有 Spectre 缓解措施的 Visual C++ ATL for ARM64"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.ATL.Spectre",
                Text = "带有 Spectre 缓解措施的 Visual C++ ATL (x86/x64)"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre",
                Text = "带有 Spectre 缓解措施的 Visual C++ MFC for x86/x64"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.ClangC2",
                Text = "Clang/C2（实验）"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.MFC.ARM",
                Text = "Visual C++ MFC for ARM"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.MFC.ARM.Spectre",
                Text = "带有 Spectre 缓解措施的 Visual C++ MFC for ARM"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.MFC.ARM64",
                Text = "Visual C++ MFC for ARM64"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.MFC.ARM64.Spectre",
                Text = "带有 Spectre 缓解措施的针对 ARM64 的 Visual C++ MFC 支持"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Runtimes.ARM.Spectre",
                Text = "面向 Spectre 的 VC++ 2022 版本 15.7 v14.14 库 (ARM)"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Runtimes.ARM64.Spectre",
                Text = "面向 Spectre 的 VC++ 2022 版本 15.7 v14.14 库 (ARM64)"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre",
                Text = "面向 Spectre 的 VC++ 2022 版本 15.7 v14.14 库 (x86 和 x64)"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Tools.14.11",
                Text = "VC++ 2022 版本 15.4 v14.11 工具集"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Tools.14.12",
                Text = "VC++ 2022 版本 15.5 v14.12 工具集"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Tools.14.13",
                Text = "VC++ 2022 版本 15.6 v14.13 工具集"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.VC.Tools.ARM64",
                Text = "用于 ARM64 的 Visual C++ 编译器和库"
            },
            new MainForm.DicNode
            {
                Parentname = "Others",
                Name = "Microsoft.VisualStudio.Component.Windows10SDK.16299.Desktop.arm",
                Text = "适用于桌面 C++ [ARM 和 ARM64] 的 Windows 10 SDK"
            }
        };

        // Token: 0x0200000C RID: 12
        private class DicNode
        {
            // Token: 0x17000008 RID: 8
            // (get) Token: 0x06000056 RID: 86 RVA: 0x00004F1D File Offset: 0x0000311D
            // (set) Token: 0x06000057 RID: 87 RVA: 0x00004F25 File Offset: 0x00003125
            public string Parentname
            {
                get
                {
                    return this.parentname;
                }
                set
                {
                    this.parentname = value;
                }
            }

            // Token: 0x17000009 RID: 9
            // (get) Token: 0x06000058 RID: 88 RVA: 0x00004F2E File Offset: 0x0000312E
            // (set) Token: 0x06000059 RID: 89 RVA: 0x00004F36 File Offset: 0x00003136
            public string Name
            {
                get
                {
                    return this.name;
                }
                set
                {
                    this.name = value;
                }
            }

            // Token: 0x1700000A RID: 10
            // (get) Token: 0x0600005A RID: 90 RVA: 0x00004F3F File Offset: 0x0000313F
            // (set) Token: 0x0600005B RID: 91 RVA: 0x00004F47 File Offset: 0x00003147
            public string Text
            {
                get
                {
                    return this.text;
                }
                set
                {
                    this.text = value;
                }
            }

            // Token: 0x1700000B RID: 11
            // (get) Token: 0x0600005C RID: 92 RVA: 0x00004F50 File Offset: 0x00003150
            // (set) Token: 0x0600005D RID: 93 RVA: 0x00004F58 File Offset: 0x00003158
            public string Tooltip
            {
                get
                {
                    return this.tooltip;
                }
                set
                {
                    this.tooltip = value;
                }
            }

            // Token: 0x1700000C RID: 12
            // (get) Token: 0x0600005E RID: 94 RVA: 0x00004F61 File Offset: 0x00003161
            // (set) Token: 0x0600005F RID: 95 RVA: 0x00004F69 File Offset: 0x00003169
            public bool Ischecked
            {
                get
                {
                    return this.ischecked;
                }
                set
                {
                    this.ischecked = value;
                }
            }

            // Token: 0x04000026 RID: 38
            private string parentname;

            // Token: 0x04000027 RID: 39
            private string name;

            // Token: 0x04000028 RID: 40
            private string text;

            // Token: 0x04000029 RID: 41
            private string tooltip;

            // Token: 0x0400002A RID: 42
            private bool ischecked;
        }

        // Token: 0x0200000D RID: 13
        // (Invoke) Token: 0x06000062 RID: 98
        public delegate string MyDelegate();
    }
}
